﻿using System;
using WpfAi.Core;
using WpfAi.Enum;
using WpfAi.TestModule;

namespace WpfAi.Model
{
    public class TestResult : VmBase
    {
        /// <summary>
        /// 排序
        /// </summary>
        public int Order { get; set; }
        /// <summary>
        /// 测试项目
        /// </summary>
        public string Title { get; set; }

        public DateTime StartTime { get; set; }

        public DateTime EndTime { get; set; }
        /// <summary>
        /// 下位机是否返回值
        /// </summary>
        public bool Result { get; set; }

        private double m_Duration;
        public double Duration
        {
            get { return m_Duration; }
            set { m_Duration = value; OnPropertyChanged(nameof(Duration)); }
        }
        private EnumState m_State;
        public EnumState State
        {
            get { return m_State; }
            set { m_State = value; OnPropertyChanged(nameof(State)); }
        }
        private string m_Message;
        public string Message
        {
            get { return m_Message; }
            set { m_Message = value; OnPropertyChanged(nameof(Message)); }
        }
        /// <summary>
        /// 测试对象
        /// </summary>
        public ITestModule Clazz { get; set; }

        public bool Break { get; set; }

        private bool m_Checked = true;
        public bool Checked
        {
            get { return m_Checked; }
            set { m_Checked = value; OnPropertyChanged(nameof(Checked)); }
        }
    }
}